/*****************************************************
Copyright (C) 2019. All rights reserved.
File name     ：LinkedStack.h
Version       ：v1.0
Author        ：zhengqijun
Date          ：2019-12-28
Function List ：
Description   ：Linked Stack
******************************************************/

#ifndef LINKEDSTACK_H_
#define LINKEDSTACK_H_

#include "AATree.h"

// Type Definition
struct Node;
typedef AATree StackElementType;  // ElementType -> StackElementType
typedef struct Node *PtrToNode;
typedef PtrToNode LinkedStack;

// Function Lists
int IsEmptyStack(LinkedStack S);  // IsEmpty -> IsEmptyStack
LinkedStack CreateStack(void);
void DisposeStack(LinkedStack S);
void MakeEmptyStack(LinkedStack S);  // MakeEmpty -> MakeEmptyStack
void Push(StackElementType X, LinkedStack S);
StackElementType Top(LinkedStack S);
void Pop(LinkedStack S);
StackElementType TopAndPop(LinkedStack S);

#endif  /* LINKEDSTACK_H_ */

// EOF

